
// 阻止架构相关的接口
import request from '@/utils/request'
// 获取部门列表
export const reqGetDeptsList = () => request({
  method: 'get',
  url: '/company/department'
})
// 删除部门
export const reqDelDept = (id) => request({
  method: 'delete',
  url: `/company/department/${id}`
})
// 获取部门负责人列表数据
export const reqGetSimpleList = () => request({
  method: 'get',
  url: '/sys/user/simple'
})
// 新增部门
export const reqAddDept = data => request({
  method: 'post',
  url: '/company/department',
  data
})
// 根据id获取部门信息
export const reqGetDeptInfoById = (id) => request({
  method: 'get',
  url: `/company/department/${id}`
})
// 更新部门信息
// put 和 post 请求携带请求体是一样的
export const reqUpdateDept = (data) => request({
  method: 'put',
  url: `/company/department/${data.id}`,
  data
})

